import React,{ useState } from 'react';
import { createRoot } from 'react-dom/client';

function App() {
    const [count, setCount] = useState(17);
    // jsx 语法不是js语法
    return (
        <>
            <h1>{count}</h1>
            <button onClick={() => setCount(count + 1)}>
            Increment
            </button>
        </>
    );
}

const root = createRoot(document.getElementById('root'));
root.render(<App />);